LGF_BinaryMaskCompare (FC / V1.0.0)
Author: Siemens Simatic Systems Support
Short description
This function compares two binary Values source and compare by a given mask.
Both given values are masked (input AND mask), and the results is than compared and returned.
Can be used for Word and Byte as well, by convert the passed parameter using for e.g. Byte_to_DWord(...).
Block Interface
| | LGF_BinaryMaskCompare (FC) | |
| DWord | | | source | | Ret_Val | | | Bool |
| | | | |
| DWord | | | compare | | | | | |
| | | | |
| DWord | | | mask | | | | | |
| | | | |
| | | |
Input parameter
| Identifier | Data type | Description |
| source | DWord | Source value to compare |
| compare | DWord | Value to compare against |
| mask | DWord | Mask the data - bits will pass if TRUE or block if FALSE |
Output parameter
| Identifier | Data type | Description |
| Ret_Val | Bool | Return TRUE if masked values are equal |
Change log
| Version & Date | Change description |
| 01.00.00 | Simatic Systems Support |
| 19.01.2021 | First released version |